<?php

class Soul_Template_Html_Grid_Cell_Checkbox extends Soul_Template_Html_Grid_Cell_Base {
	
	private $_value = '';
	private $_name = '';
	
    public function __construct(){
        parent::__construct();
        $this->addClass('checkbox')
             ->setStyle('text-align', 'center');
    }
    
    public function getValue(){
    	return $this->_value;
    }
    
    public function setValue($value){
    	$this->_value = $value;
    	return $this;
    }   
    
    public function getName(){
    	return $this->_name;
    }
    
    public function setName($value){
    	$this->_name = $value;
    	return $this;
    }

    public function renderChildren(){
    	$v = Soul_Util_String::format($this->getValue(), $this->getGrid()->getCurrentRow());
    	return '<input type="checkbox" name="'.$this->getName().'" value="'.$v.'"/>';
    }
}